
#ifndef _TEXTMODE_H
#define _TEXTMODE_H

#include <stdint.h>
#include <stddef.h>

#define VGA_WIDTH 80
#define VGA_HEIGHT 20

#define TEXTMODE_COLOR_BLACK 0x0
#define TEXTMODE_COLOR_BLUE 0x1
#define TEXTMODE_COLOR_GREEN 0x2
#define TEXTMODE_COLOR_CYAN 0x3
#define TEXTMODE_COLOR_RED 0x4
#define TEXTMODE_COLOR_MAGENTA 0x5
#define TEXTMODE_COLOR_BROWN 0x6
#define TEXTMODE_COLOR_LIGHTGRAY 0x7
#define TEXTMODE_COLOR_DARKGRAY 0x8
#define TEXTMODE_COLOR_LIGHTBLUE 0x9
#define TEXTMODE_COLOR_LIGHTRED 0xC
#define TEXTMODE_COLOR_LIGHTMAGENTA 0xD
#define TEXTMODE_COLOR_YELLOW 0xE
#define TEXTMODE_COLOR_WHITE 0xF

typedef uint16_t tm_char; 

const tm_char textmode_make_char(const char c, const char color); 
void textmode_terminal_init(); 
void textmode_put_char(const size_t x, const size_t y, const char symbol, const char color); 
void textmode_put_tm_char(const size_t x, const size_t y, const tm_char tm_symbol); 
void textmode_terminal_writechar(char symbol, char color);
void print_colored(const char* string, const char color);
void print(const char* string);
void print_int(int num); 
void println_int(const int num); 

#endif